<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header('云书')"></head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <header class="main-header">
        <a href="/" class="logo">云书</a>
        <nav class="navbar navbar-static-top">
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <li class="dropdown tasks-menu">
                        <a href="/logout" class="dropdown-toggle">退出</a>
                    </li>
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <span class="hidden-xs"></span>
                        </a>
                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <aside class="main-sidebar">
        <section class="sidebar">
            <div class="user-panel">
                <div class="pull-left image">
                    <img th:src="@{/demo/resources/adminlte/dist/img/default-50x50.gif}" class="img-circle"
                                               alt="User Image">
                </div>
                <div class="pull-left info">
                    <p>[[${session.loginUser.loginName}]]</p>
                    <i class="fa fa-circle text-success"></i> 在线
                </div>
            </div>
            <ul class="sidebar-menu" data-widget="tree">
                <li th:each="menu,iterStat: ${menus}" th:class="${iterStat.index eq 0}?'active treeview':' treeview' ">

                        <a href="#">
                            <i th:class="${menu.icon}"></i> <span>[[${menu.name}]]</span>
                            <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
                        </a>
                        <ul class="treeview-menu">
                            <li th:each="children,index:${menu.sysMenus}"
                                th:class="${iterStat.index eq 0 &amp;&amp;  index.index eq 0}?'active':''">
                                <a th:href="@{${children.href}}" onclick="onLoads(this.href);return false;">
                                    <i th:class="${children.icon}"></i>[[${children.name}]]
                                </a>
                            </li>
                        </ul>

                </li>
            </ul>
        </section>
    </aside>
    <input id="href" type="hidden">
    <div class="content-wrapper" id="loadhtml">

    </div>
    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            云书
        </div>
        <strong>Copyright &copy; 2018 <a href="#">火点儿信息技术</a>.</strong> All rights reserved.
    </footer>
</div>

<div th:include="include :: footer"></div>
<script th:src="@{/demo/resources/sys/index.js}"></script>
</body>
</html>